<!-- Usage as a class -->
<style>
.table{margin-top:10px;}
</style>
<div class="clearfix"></div>
            <table class="table table-bordered">
                        <thead>
                            <tr>
{#                                <th><input type="checkbox" checked id="select_all" /></th>#}
                                <th> eth1 - {{ host_count }} 台</th>
                                <th> 机柜 </th>
                                <th> 系统状态 </th>
                            </tr>
                        </thead>

                        {% for i in host_list %}
                        <tbody>
                            <tr >
{#                                <td width="40"><input type="checkbox" checked name="node_name" value="{{i.eth1}}"/></td>#}
                                <td width="120"> {{ i.eth1 }}</td>
                                <td width="100">{{ i.room_number }} - {{ i.server_cabinet_id }}</td>
{#                                <td width="200">  {% if i.business %}<a href="/assets/server/server_type/{{ i.business.id }}/ ">{{ i.business }}</a>{% endif %}  </td>#}

                                <td width="50">
                                <div class="btn-group" data-toggle="buttons">
                                    {% if i.status == 0 %}
                                        <label class="btn btn-xs btn-danger disabled">
                                        <input type="radio" name="options" id="option3">
                                        未安装系统</label>
                                    {% elif i.status == 1 %}
                                    <label class="btn btn-xs btn-success disabled">
                                        <input type="radio" name="options" id="option3">
                                        OK</label>
                                    {% else %}
                                    <label class="btn btn-xs btn-warning disabled">
                                        <input type="radio" name="options" id="option3">
                                        系统安装中</label>
                                    {% endif %}
                                </div></td>
                            </tr>
                        </tbody>
                        {% endfor %}
            </table>
<script>
    $(document).on("click","#select_all",function(e){
       var selected = $("#select_all").prop("checked");
       if(selected){
         $("input[name='node_name']").prop('checked',true);
       }else{
         $("input[name='node_name']").prop("checked",false);
       }
     });
</script>